package com.xwj.service;

import com.xwj.config.FeignConfig;
import com.xwj.dto.CommonResult;
import com.xwj.fallback.PaymentServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author xwj
 * @date 2020/10/28
 */
@FeignClient(name = "nacos-payment-provider", fallbackFactory = PaymentServiceFallbackFactory.class, configuration = FeignConfig.class)
public interface PaymentService {
    /**
     * 调用服务提供方的输出接口
     *
     * @param id
     * @return
     */
    @GetMapping(value = "/payment/nacos/{id}")
    String pay(@PathVariable("id") Integer id);
}
